package cn.iocoder.yudao.module.picturebook.dal.mysql.bigplan;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.picturebook.dal.dataobject.bigplan.BigplanDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.picturebook.controller.admin.bigplan.vo.*;

/**
 * 大计划表	 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface BigplanMapper extends BaseMapperX<BigplanDO> {

    default PageResult<BigplanDO> selectPage(BigplanPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<BigplanDO>()
                .likeIfPresent(BigplanDO::getPlanName, reqVO.getPlanName())
                .eqIfPresent(BigplanDO::getTotalDay, reqVO.getTotalDay())
                .betweenIfPresent(BigplanDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(BigplanDO::getBigPlanId));
    }

    List<BigplanDO> selectBigPlans(Integer userId);

    void deleteByBigId(Integer id);
}